<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>여기는 Products</title>

<script type="text/javascript" src="scripts/jquery-1.4.min.js"></script>

<script type="text/javascript">
	function cal(num) {
		document.myform.screen.value+=num;
	}
	function answer() {
		document.myform.screen.value=eval(document.myform.screen.value);
	}
	function clearcal(){
		document.myform.screen.value="";
	}
</script>

</head>
<body>
<section>
<h1>Products</h1>
<br/><br/>
<h2>계산기</h2>
<br/><br/>
<form name="myform">
	<table border="1">
		<tr><td>
		<input type="text" name="screen">
		</td></tr>
		<tr><td>
		<input type="button" value=" 7 " onclick="cal('7')">
		<input type="button" value=" 8 " onclick="cal('8')">
		<input type="button" value=" 9 " onclick="cal('9')">
		<input type="button" value=" + " onclick="cal('+')">
		</td></tr>
		<tr><td>
		<input type="button" value=" 4 " onclick="cal('4')">
		<input type="button" value=" 5 " onclick="cal('5')">
		<input type="button" value=" 6 " onclick="cal('6')">
		<input type="button" value=" * " onclick="cal('*')">
		</td></tr>
		<tr><td>
		<input type="button" value=" 1 " onclick="cal('1')">
		<input type="button" value=" 2 " onclick="cal('2')">
		<input type="button" value=" 3 " onclick="cal('3')">
		<input type="button" value=" / " onclick="cal('/')">
		</td></tr>
		<tr><td>
		<input type="button" value=" 0 " onclick="cal('0')">
		<input type="button" value=" . "  onclick="cal('.')">
		<input type="button" value=" Clear " onclick="clearcal()">
		<input type="button" value=" = " onclick="answer()">
		</td></tr>
	</table>
</form>
</section>
</body>
</html>